Allocation control method and apparatus

ABSTRACT

An allocation control method includes: determining, for each of plural virtual machines executed on a first information processing apparatus or a second information processing apparatus, whether the virtual machine is executing a first processing that is performed in response to a request from an external apparatus; first allocating, to the first information processing apparatus, first virtual machines, which are executing the first processing, among the plural virtual machines; and second allocating, to the second information processing apparatus, second virtual machines, which are not executing the first processing, among the plural virtual machines.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based upon and claims the benefit of priority of theprior Japanese Patent Application No. 2014-059136, filed on Mar. 20,2014, the entire contents of which are incorporated herein by reference.

FIELD

This invention relates to a technique for allocating a virtual machine.

BACKGROUND

A proportion of electricity charges to an operational cost of a datacenter is large. According to a certain survey, the proportion ofelectricity charges to the operational cost of the data center isapproximately 32.4%, although a proportion of electricity charges to aproduction cost of a large manufacturer is approximately 3%. Therefore,a company that manages the data center makes various efforts to reduceelectricity consumption in the data center.

For example, a certain document focuses on a fact that resources of aphysical server in the data center are not effectively used andelectricity consumption becomes high as a result. Specifically, it isproposed to reallocate, based on a usage rate of the resources of thephysical server, the resources to be allocated to virtual machines inorder to reduce resources which are not used and reduce electricityconsumption in a whole system.

Patent Document 1: Japanese Laid-open Patent Publication No. 2010-61278

However, even though the technique described above is used, there's acase where the resources of the physical server are not effectively usedand a reduction of electricity consumption is not enough.

SUMMARY

An allocation control method relating to one aspect of this embodimentincludes: determining, for each of plural virtual machines executed on afirst information processing apparatus or a second informationprocessing apparatus, whether the virtual machine is executing a firstprocessing that is performed in response to a request from an externalapparatus; first allocating, to the first information processingapparatus, first virtual machines, which are executing the firstprocessing, among the plural virtual machines; and second allocating, tothe second information processing apparatus, second virtual machines,which are not executing the first processing, among the plural virtualmachines.

The object and advantages of the embodiment will be realized andattained by means of the elements and combinations particularly pointedout in the claims.

It is to be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory and arenot restrictive of the embodiment, as claimed.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram depicting a system outline of this embodiment;

FIG. 2 is a diagram to explain migration of a VM;

FIG. 3 is a functional block diagram of an allocation managementapparatus;

FIG. 4 is a diagram depicting an example of data stored in a performancedata storage unit;

FIG. 5 is a diagram depicting a main processing flow;

FIG. 6 is a diagram depicting a processing flow of a state specificationprocessing;

FIG. 7 is a diagram depicting an example of data stored in a thresholdstorage unit;

FIG. 8 is a diagram depicting an example of changes in data traffic in anetwork;

FIG. 9 is diagram depicting an example of changes in CPU utilization;

FIG. 10 is a diagram depicting an example of a data format;

FIG. 11 is a diagram depicting an example of a state log stored in astate log storage unit;

FIG. 12 is a diagram depicting a processing flow of a calculationprocessing;

FIG. 13 is a diagram depicting an example of time-series data stored ina time-series data storage unit;

FIG. 14 is a diagram depicting an example of data concerning the numberof VMs, which is stored in a first VM data storage unit;

FIG. 15 is a diagram depicting an example of a program to generate thedata concerning the number of VMs;

FIG. 16 is a diagram depicting an example of data concerning a maximumnumber of VMs, which is stored in a second VM data storage unit;

FIG. 17 is a diagram to explain changes in the number of idle VMs;

FIG. 18 is a diagram to explain changes in the number of idle VMs;

FIG. 19 is a diagram to explain changes in the number of idle VMs;

FIG. 20 is a diagram to explain changes in the number of idle VMs;

FIG. 21 is a diagram to explain changes in the number of idle VMs;

FIG. 22 is a diagram to explain changes in the number of idle VMs;

FIG. 23 is a diagram to explain changes in the number of idle VMs;

FIG. 24 is a diagram to explain changes in the number of idle VMs;

FIG. 25 is a diagram depicting a processing flow of a detectionprocessing;

FIG. 26 is a diagram depicting changes in the number of idle VMs in adata center;

FIG. 27 is a diagram depicting an example of a script;

FIG. 28 is a diagram depicting an available memory amount;

FIG. 29 is a diagram depicting an available memory amount;

FIG. 30 is a diagram depicting a processing flow of a processingexecuted by a script execution unit;

FIG. 31 is a diagram depicting a window to perform setting;

FIG. 32 is a diagram to explain a relationship between a memory amountallocated to VMs and performance;

FIG. 33 is a diagram to explain a relationship between a memory amountallocated to VMs and performance;

FIG. 34 is a diagram depicting changes in the number of VMs and CPUutilization; and

FIG. 35 is a functional block diagram of a computer.

DESCRIPTION OF EMBODIMENTS

FIG. 1 illustrates a system outline of this embodiment. Applicationservers 30 to 32 that are physical servers, a server 5 for idle VMs(Virtual Machines), which is a physical server, an allocation managementapparatus 1 that performs a main processing in this embodiment, and aquality management apparatus 7 are connected to a network 9 that is, forexample, a LAN (Local Area Network). In the following, a VM that is inan idle state is called an idle VM, and a VM that is executingtransaction to provide a service is called an operating VM. Thetransaction is, for example, executed in response to a request from anexternal terminal or the like (not illustrated). A VM which is in theidle state executes an OS (Operating System), but it does not executethe processing to provide the service.

The application servers 30 to 32 are servers to execute the operatingVMs. The allocation management apparatus 1 migrates an idle VM, whichhas been in the idle state for a predetermined time or longer in theapplication server 30, from the application server 30 to the server 5for idle VMs.

Application servers that do not execute a VM (in the example of FIG. 1,the application servers 31 and 32) are powered off. By using FIG. 2, amethod to reduce electricity consumption by collecting up VMs isexplained. In this embodiment, the electricity consumption is reduced bydecreasing the number of application servers which are powered on. In anexample of FIG. 2, the application server 32 is powered off because itdoes not execute any VM, and the application servers 30 and 31 arepowered on because they execute a VM. For example, VMs on theapplication server 31 are migrated to the application server 30 when CPU(Central Processing Unit) utilization of the application server 30 doesnot reach a predetermined reference value. The application server 32 ispowered on when it is impossible to execute all VMs to be executed inthe application servers 30 and 31.

The server 5 for idle VMs is a server to execute idle VMs. When a VMstarted to work in the server 5 for idle VMs (in other words, anoperating VM is detected), the allocation management apparatus 1migrates the VM from the server 5 for idle VMs to the application server30. Because it is assumed that the server 5 for idle VMs does notexecute the transaction, computing performance of the server 5 for idleVMs may be lower than that of the application servers 30 to 32.

The quality management apparatus 7 is a server that collects performancedata from the application servers 30 to 32 and the server 5 for idleVMs. The performance data includes date and time, a VM name, CPUutilization, an amount of I/O (Input/Output) data, and data traffic in anetwork or the like.

FIG. 3 illustrates a functional block diagram of the allocationmanagement apparatus 1. The allocation management apparatus 1 includes acontroller 100, a state specification unit 101, a calculator 102, adetector 103, a script execution unit 104, a state log storage unit 105,a time-series data storage unit 106, a first VM data storage unit 107, ascript storage unit 108, a performance data storage unit 109, athreshold storage unit 110, and a second VM data storage unit 111.

The controller 100 controls execution of a processing by the allocationmanagement apparatus 1. The state specification unit 101 uses datastored in the performance data storage unit 109 and data stored in thethreshold storage unit 110 to perform a processing, and stores a resultof the processing in the state log storage unit 105. The calculator 102uses data stored in the state log storage unit 105 to perform aprocessing, and stores a result of the processing in the time-seriesdata storage unit 106. Moreover, the calculator 102 uses data stored inthe time-series data storage unit 106 to perform a processing, andstores a result of the processing in the first VM data storage unit 107.Moreover, the calculator 102 uses data stored in the first VM datastorage unit 107 to perform a processing, and stores a result of theprocessing in the second VM data storage unit 111. The detector 103 usesdata stored in the time-series data storage unit 106 and data stored inthe second VM data storage unit 111 to perform a processing, and storesa result of the processing in the script storage unit 108. The scriptexecution unit 104 executes a script stored in the script storage unit108.

FIG. 4 illustrates an example of data stored in the performance datastorage unit 109. In an example of FIG. 4, date and time, a VM name, CPUutilization, an amount of I/O data, and data traffic in a network arestored. Performance data of the application servers 30 to 32 and theserver 5 for idle VMs is collected, for example, every minute by thequality management apparatus 7, and is stored in the performance datastorage unit 109 of the allocation management apparatus 1.

In this embodiment, a VM, which is invariably in an idle state and neverperforms the transaction, (hereinafter referred to a VM for detection)is deployed to the server 5 for idle VMs separately from VMs forproviding the service. The VM for detection is a VM which is used whendetecting an idle VM.

Next, by using FIGS. 5 to 31, a processing executed by the allocationmanagement apparatus 1 is explained. First, the controller 100determines whether a predetermined time (for example, 24 hours) haspassed since a previous processing (FIG. 5: step S1).

When it is determined that the predetermined time has not passed (stepS1: No route), the processing returns to the processing of the step S1.On the other hand, when it is determined that the predetermined time haspassed (step S1: Yes route), the controller 100 outputs a request forexecution of a processing to the state specification unit 101.

In response to this, the state specification unit 101 executes a statespecification processing (step S3). The state specification processingis explained by using FIGS. 6 to 11.

First, the state specification unit 101 reads out performance data ofthe VM for detection in an immediate predetermined time period (forexample, 24 hours) from the performance data storage unit 109. Theperformance data of the VM for detection is, for example, performancedata whose VM name is “IDLE01” in FIG. 4. Then, the state specificationunit 101 calculates a threshold to detect an idle VM from theperformance data of the VM for detection in the immediate predeterminedtime period, and stores the threshold in the threshold storage unit 110(FIG. 6: step S21). The threshold is, for example, an average value ofthe performance data in the immediate predetermined time period.

FIG. 7 illustrates an example of data stored in the threshold storageunit 110. In an example of FIG. 7, a threshold for CPU utilization, athreshold for an amount of I/O data, and a threshold for data traffic ina network are stored in the threshold storage unit 110.

The state specification unit 101 compares performance data of each VMexecuted in the system in the immediate predetermined time period withthresholds stored in the threshold storage unit 110 to calculate an idletime for each VM in the immediate predetermined time period (step S23).

By using FIGS. 8 and 9, a comparison of the performance data of each VMwith the thresholds is explained. FIG. 8 illustrates an example ofchanges in data traffic in a network. In FIG. 8, a vertical axisrepresents data traffic (kB/s), and a horizontal axis represents time. Abroken line represents a threshold, and the threshold is 5 kB/s. In anexample of FIG. 8, data traffic from VM1 to VM4 is less than thethreshold in an entire time period.

FIG. 9 illustrates an example of changes in CPU utilization. In FIG. 9,a vertical axis represents CPU utilization (%), and a horizontal axisrepresents time. A broken line represents a threshold, and the thresholdis 10%. In an example of FIG. 9, although CPU utilization of VM1 and VM3is less than 10% in almost the entire time period, CPU utilization ofVM2 and VM4 often exceeds 10% especially in the latter part of the timeperiod.

In this embodiment, for example, a state of a VM is regarded as the idlestate at a time when performance data is less than the threshold for anyof the items. Therefore, in the examples illustrated in FIGS. 8 and 9,it is determined that VM2 and VM4 are not in the idle state during thelatter part of the time period.

An idle time calculated at the step S23 is stored in a storage devicesuch as a main memory or the like, for example, in a format illustratedin FIG. 10. In an example of FIG. 10, a VM name and an idle time areincluded.

Then, the state specification unit 101 detects a VM whose ratio of theidle time to the immediate predetermined time period is equal to orgreater than a threshold (for example, 0.9) (step S25). Then, theprocessing returns to the calling-source processing. A VM whose ratio ofthe idle time is equal to or greater than, for example, 0.9 isdetermined to be in the idle state. This is because it is possible toprevent a temporary processing (for example, a virus scan) frominfluencing the determination of the state. Incidentally, a VM which isin the idle state may not be detected at the step S25.

The state specification unit 101 stores a result of the processing atthe step S25 in the state log storage unit 105. FIG. 11 illustrates anexample of a state log stored in the state log storage unit 105. In anexample of FIG. 11, date and time, a VM name, identification informationof a server, and information that represents a state are stored in thestate log storage unit 105. “Work” represents that a VM is working, and“Idle” represents that a VM is in the idle state. A VM, which wasdetected at the step S25, is set as “Idle”. And a VM, which was notdetected at the step S25, is set as “Work”.

As described above, it is possible to determine whether or not a VM isin an idle state with high precision because performance data of the VMfor detection, which does not execute the transaction, is used.

Returning to the explanation of FIG. 5, the controller 100 outputs arequest for execution of a calculation processing to the calculator 102.Accordingly, the calculator 102 executes the calculation processing(step S5). The calculation processing is explained by using FIGS. 12 to24.

Firstly, the calculator 102 converts a state log stored in the state logstorage unit 105 into time-series data, and stores the time-series datain the time-series data storage unit 106 (FIG. 12: step S31).

FIG. 13 illustrates an example of time-series data stored in thetime-series data storage unit 106. In an example of FIG. 13, a VM name,identification information of a server, and information that representsa state are stored in the time-series data storage unit 106. Theinformation that represents the state is stored for each day in apredetermined period (in the example of FIG. 13, 4 days).

Then the calculator 102 sets a natural number n as 1, which representsthe number of days that a VM has been in the idle state (step S33).

The calculator 102 generates, for each day of time-series data stored inthe time-series data storage unit 106, first VM data by counting thenumber of VMs in each state (step S35) and stores the first VM data inthe first VM data storage unit 107.

FIG. 14 illustrates an example of the first VM data stored in the firstVM data storage unit 107. In an example of FIG. 14, for each day in 4days from September 29 to October 2, the number of VMs which have beenin the idle state for 1 day, the number of VMs which have been in theidle state for 2 days, the number of VMs which have been in the idlestate for 3 days or more, and the estimated number of operating VMs inthe server 5 for idle VMs in a case where a migration of VMs, which havebeen in the idle state for 3 days or more, to the server 5 for idle VMsis performed are stored in the first VM data storage unit 107. Theexample of FIG. 14 is an example in the case of n=2. For example, in thecase of n=3, the number of VMs which have been in the idle state for 1day, the number of VMs which have been in the idle state for 2 days, thenumber of VMs which have been in the idle state for 3 days, the numberof VMs which have been in the idle state for 4 days or more, and theestimated number of operating VMs in the server 5 for idle VMs in a casewhere a migration of VMs, which have been in the idle state for 4 daysor more, to the server 5 for idle VMs is performed are stored in thefirst VM data storage unit 107. A program to generate, from time-seriesdata on a spreadsheet, first VM data on the same spreadsheet is, forexample, a program illustrated in FIG. 15.

Then, the calculator 102 identifies the maximum value among theestimated numbers of operating VMs from the first VM data generated atthe step S35 (step S37), and stores the maximum value in the second VMdata storage unit 111. The maximum number is “2” when the first VM datais, for example, data illustrated in FIG. 14.

The calculator 102 determines whether n=n_(max) holds (step S39).n_(max) is a natural number set by an administrator or the like inadvance. For example, n_(max) is “7”. When it is determined thatn=n_(max) does not hold (step S39: No route), the calculator 102increments n by “1” (step S41). Then, the processing returns to theprocessing of the step S35. On the other hand, when it is determinedthat n=n_(max) holds (step S39: Yes route), the processing returns tothe calling-source processing.

By executing the processings described above, data as illustrated inFIG. 16 is stored in the second VM data storage unit 111. In an exampleof FIG. 16, a value of n and the maximum value among the estimatednumbers of operating VMs on the server 5 for idle VMs in a case where amigration of VMs which have been in the idle state for n days or more tothe server 5 for idle VMs is performed are stored in the second VM datastorage unit 111.

Here, an explanation of the calculation processing is added. FIGS. 17 to24 illustrate changes in the number of VMs which migrate to the server 5for idle VMs, the number of operating VMs on the server 5 for idle VMs,and the number of VMs on the server 5 for idle VMs in the case of n=7.Here, an example in which migrations of VMs start on Sep. 29, 2013, andcontinue until Oct. 6, 2013 is illustrated.

FIG. 17 illustrates a state of Sep. 29, 2013, which is the first day. Onthe first day, VMs which have been in the idle state for 7 days and VMswhich have been in the idle state for 8 days or more are migrated to theserver 5 for idle VMs. Therefore, the number of VMs on the server 5 foridle VMs comes to 177. In this stage, assume that there are no operatingVMs on the server 5 for idle VMs.

FIG. 18 illustrates a state of Sep. 30, 2013. On Sep. 30, 2013, thenumber of VMs which have been in the idle state for 7 days is 1, and thenumber of VMs, which have started their operation on the server 5 foridle VMs and changed into operating VMs, is 17. The former VM ismigrated to the server 5 for idle VMs, and the latter VMs are migratedto one of the application servers 30 to 32. Therefore, the number of VMson the server 5 for idle VMs is 161 (=177+1−17).

FIG. 19 illustrates a state of Oct. 1, 2013. On Oct. 1, 2013, the numberof VMs which have been in the idle state for 7 days is 23, and thenumber of VMs, which have started their operation on the server 5 foridle VMs and changed into operating VMs, is 22. The former VMs aremigrated to the server 5 for idle VMs, and the latter VMs are migratedto one of the application servers 30 to 32. Therefore, the number of VMson the server 5 for idle VMs is 162 (=161+23−22).

FIG. 20 illustrates a state of Oct. 2, 2013. On Oct. 2, 2013, the numberof VMs which have been in the idle state for 7 days is 13, and thenumber of VMs, which have started their operation on the server 5 foridle VMs and changed into operating VMs, is 31. The former VMs aremigrated to the server 5 for idle VMs, and the latter VMs are migratedto one of the application servers 30 to 32. Therefore, the number of VMson the server 5 for idle VMs is 144 (=162+13−31).

FIG. 21 illustrates a state of Oct. 3, 2013. On Oct. 3, 2013, the numberof VMs which have been in the idle sate for 7 days is 21, and the numberof VMs, which have started their operation on the server 5 for idle VMsand changed into operating VMs, is 12. The former VMs are migrated tothe server 5 for idle VMs, and the latter VMs are migrated to one of theapplication servers 30 to 32. Therefore, the number of VMs on the server5 for idle VMs is 153 (=144+21−12).

FIG. 22 illustrates a state of Oct. 4, 2013. On Oct. 4, 2013, the numberof VMs which have been in the idle state for 7 days is 14, and thenumber of VMs, which have started their operation on the server 5 foridle VMs and changed into operating VMs, is 11. The former VMs aremigrated to the server 5 for idle VMs, and the latter VMs are migratedto one of the application servers 30 to 32. Therefore, the number of VMson the server 5 for idle VMs is 156 (=153+14−11).

FIG. 23 illustrates a state of Oct. 5, 2013. On Oct. 5, 2013, the numberof VMs which have been in the idle state for 7 days is 2, and the numberof VMs, which have started their operation on the server 5 for idle VMsand changed into operating VMs, is 2. The former VMs are migrated to theserver 5 for idle VMs, and the latter VMs are migrated to one of theapplication servers 30 to 32. Therefore, the number of VMs on the server5 for idle VMs is 156 (=156+2−2).

FIG. 24 illustrates a state of Oct. 6, 2013. On Oct. 6, 2013, the numberof VMs which have been in the idle state for 7 days is 0, and the numberof VMs, which have started their operation on the server 5 for idle VMsand changed into operating VMs, is 1. The VMs that started theiroperation on the server 5 for idle VMs are migrated to one of theapplication servers 30 to 32. Therefore, the number of VMs on the server5 for idle VMs is 155 (=156+0−1).

Therefore, the maximum number of operating VMs on the server 5 for idleVMs is 31 in the examples illustrated in FIGS. 17 to 24. The maximumnumber is used for a detection processing.

Returning to the explanation of FIG. 5, the controller 100 outputs arequest for execution of the detection processing to the detector 103.In response to this, the detector 103 executes the detection processing(step S7). The detection processing is explained by using FIGS. 25 and26.

Firstly, the detector 103 calculates Vnum that is the number of VMs thatthe server 5 for idle VMs can execute (FIG. 25: step S51). At the stepS51, Vnum is calculated by, for example, Vnum=(memory capacity of theserver 5 for idle VMs)/(a memory amount allocated to one VM)*R. Thememory amount allocated to one VM is calculated, for example, bydividing a measured value of a total memory amount allocated to VMs inthe whole system by the number of VMs. R is a value that represents howmuch memory overcommit caused by operating VMs on the server 5 for idleVMs is allowed. For example, R=1.5 means that allocating a memory amount1.5 times as much as memory capacity of the server 5 for idle VMs isallowed.

FIG. 26 illustrates changes in the number of idle VMs in the system.Here, for each day, the number of VMs in the idle state is illustratedfor each number of days that VMs are in the idle state. For example, onSep. 29, 2013, the number of VMs which have been in the idle state for 7days or more is the largest, and the number of VMs which have been inthe idle state for six days is the least. In a time period illustratedin FIG. 26, Oct. 2, 2013 is a date in which the number of VMs, whichhave started their operation on the server 5 for idle VMs and changedinto operating VMs, is the greatest as illustrated in FIGS. 17 to 24.The number of operating VMs is 31 on this date. Therefore, when a memoryamount per one VM is 4 GB and R=1.5, memory capacity of the server 5 foridle VMs is approximately 83 GB (≈4*31/1.5). Namely, a physical serverwhose memory capacity is 83 GB or more may be used.

The detector 103 searches for n that satisfies (the maximum number ofVMs≦Vnum) in the second VM data storage unit 111 (step S53).

The detector 103 determines whether n that satisfies (the maximum numberof VMs Vnum) has been detected at the step S53 (step S55). When it isdetermined that n has not been detected (step S55: No route), theprocessing returns to the calling-source processing because VMs are notmigrated.

On the other hand, when it is determined that n has been detected (stepS55: Yes route), the detector 103 detects, from the time-series datastorage unit 106, VMs executed on one of the application servers 30 to32 among VMs which have been in the idle state for n (here, the detectedn) days or more (step S57).

The detector 103 detects, from the time-series data storage unit 106,VMs executed on the server 5 for idle VMs among operating VMs (stepS59). Then, the processing ends.

By performing processings described above, it is possible to preventperformance of the transaction executed by operating VMs on the server 5for idle VMs from degrading severely and to migrate idle VMs to theserver 5 for idle VMs.

For example, the detector 103 may display a value of the detected n on adisplay device or the like of the allocation management apparatus 1.Thus, an operator of the allocation management apparatus 1 can check thevalue of n and select a physical server whose memory capacity is properas the server 5 for idle VMs.

Returning to the explanation of FIG. 5, the detector 103 determineswhether VMs have been detected at the step S57 or the step S59 (stepS9). When it is determined that the VMs have not been detected (step S9:No route), the processing returns to the processing of the step S1because there is no VM to be migrated. Furthermore, when the processingof the step S57 and step S59 was not performed, the processing returnsto the processing of the step S1 because there is no VM to be migrated.

On the other hand, when it is determined that the VMs have been detectedat the step S57 or step S59 (step S9: Yes route), the detector 103generates a script to migrate the detected VMs (step S11), and storesthe script in the script storage unit 108. Then, the processing returnsto the processing of the step S1.

FIG. 27 illustrates an example of the script generated at the step S11.A code in the first line is a code to write information that representsa migration of VMs is performed into a system log. A code in the secondline is a code to migrate “Web1”, which is an idle VM, to “G01” which isthe server 5 for idle VMs. A code in the third line is a code to migrate“Web6”, which is an operating VM, to “B03” which is an applicationserver. A code in the fourth line is a code to write information thatrepresents the migration of the VMs is completed into the system log.

Assume that an application server that is a destination of a migrationis, for example, an application server whose available memory amount isthe largest. For example, as illustrated in FIG. 28, assume that anavailable memory amount of the application server “B01” is 20 GB, anavailable memory amount of the application server “B02” is 15 GB, and anavailable memory amount of the application server “B03” is 22 GB. Inthis case, the application server “B03” is selected as an applicationserver that is the destination of the migration.

Then, assume that available memory capacity of each application servercomes to a state illustrated in FIG. 29 as a result of the migration ofVMs. Specifically, available memory capacity of the application server“B01” is 20 GB, available memory capacity of the application server“B02” is 15 GB, and available memory capacity of the application server“B03” is 18 GB. In this case, an application server that will beselected next as the destination of the migration is the applicationserver “B01”.

When the processing returns to the processing of the step S1, thecontroller 100 deletes the time-series data stored in the time-seriesdata storage unit 106, the first VM data stored in the first VM datastorage unit 107, the script stored in the script storage unit 108, thethresholds stored in the threshold storage unit 110, and the second VMdata stored in the second VM data storage unit 111.

It is possible to reduce the number of operating physical servers evenwhen collecting up VMs simply based on CPU utilization or the like.However, there's a case where memory overcommit occurs and performanceof the transaction degrades due to memory consumption by idle VMs.Namely, a state in which an available memory amount is not enoughalthough CPU utilization is low occurs in an application server.However, in this embodiment, since a script for allocating an idle VMand an operating VM on different servers is generated, it is possible toallocate so as to suppress performance degradation of the transaction.

Next, by using FIG. 30, a processing executed by the script executionunit 104 is explained. First, the script execution unit 104 determineswhether a predetermined time (for example, 24 hours) has passed since aprevious processing (FIG. 30: step S61). When it is determined that thepredetermined time has not passed (step S61: No route), the processingreturns to the processing of the step S61. When it is determined thatthe predetermined time has passed (step S61: Yes route), the scriptexecution unit 104 determines whether a script exists in the scriptstorage unit 108 (step S63).

When it is determined that the script does not exist (step S63: Noroute), the processing returns to the processing of the step S61. On theother hand, when it is determined that the script exists (step S63: Yesroute), the script execution unit 104 executes the script stored in thescript storage unit 108 (step S65). Then, the processing returns to theprocessing of the step S61.

An operator of the allocation management apparatus 1 causes a displaydevice (for example, monitors or the like) to display, for example, awindow illustrated in FIG. 31, and carries out a setting for executionof a script. For example, it is possible to carry out, in a setting area3001, a setting for an interval of processings executed by the scriptexecution unit 104. In an example of FIG. 31, the script execution unit104 executes a processing at 13 o'clock everyday (in other words, thepredetermined time at the step S61 is 24 hours). Moreover, it ispossible to carry out, in a detailed setting area 3002, detailedsettings for items other than the interval of processings. When theoperator pushes a button 3003 by clicking a mouse, the settings arecompleted.

As described above, by migrating VMs that do not execute the transactionto the server 5 for idle VMs, it is possible to suppress performancedegradation of the transaction and reduce the number of working physicalservers. In other words, it is possible to use resources of physicalservers effectively and reduce electricity consumption.

Moreover, because the number of idle VMs executed by an applicationserver becomes less and memory usage of the application server becomesless, it is possible to prevent memory overcommit from occurring in theapplication server. Moreover, even when operating VMs are collected upto the application server, the memory overcommit hardly occurs.

Incidentally, there's a possibility that the memory overcommit occurs inthe server 5 for idle VMs. However, because idle VMs do not execute thetransaction and operating VMs are migrated to an application server at atime when the operating VMs are detected, the transaction is hardlyaffected.

Moreover, once idle VMs are stopped, a reboot is required before the VMsexecute the transaction. Therefore, it takes a while to start executionof the transaction. For example, consider that 450 VMs exist and ittakes 1 minute to stop and reboot one VM. In this case, a loss of a time(whose length is 450 minutes=7 hours and 30 minutes) occurs when each VMreboots once. However, it is possible to restart the transaction quicklyand users of the service are scarcely affected because any idle VMs arenot stopped in this embodiment.

Although the embodiment of this invention was explained above, thisinvention is not limited to those. For example, the functional blockconfiguration of the allocation management apparatus 1 do not alwayscorrespond to a program module configuration.

Moreover, the respective formats of the aforementioned tables are mereexamples, and may be changed. Furthermore, as for the processing flow,as long as the processing results do not change, the turns of the stepsmay be exchanged or the steps may be executed in parallel.

Incidentally, although the number of the server 5 for idle VMs is 1 inthe aforementioned example, the number of the server 5 for idle VMs maybe more than 1.

APPENDIX

In this appendix, matters relating to this embodiment are explained.

(1) A Memory Amount Allocated to VMs.

When the number of VMs operating on a physical server graduallyincreases, performance dramatically degrades in a specified timing. Thisis explained by using a graph of FIG. 32, which is generated frommeasured data for a specific physical server. In FIG. 32, a horizontalaxis represents a memory amount allocated to VMs, and a vertical axisrepresents a ratio of a compilation execution time. The ratio of thecompilation execution time is a ratio of a time for execution ofcompilation to a time for execution of compilation in an environment inwhich only VMs for measurement are allocated (here, 536 seconds). Thelarger the ratio of the compilation execution time is, the worseperformance is. Physical memory capacity that a physical server has is32 GB. As illustrated in FIG. 32, performance scarcely changes when amemory amount allocated to VMs is equal to or less than 32 GB. However,the ratio of the compilation execution time dramatically rises when thememory amount allocated to VMs exceeds 32 GB. The reason is that memoryovercommit occurs.

FIG. 33 depicts a diagram to compare a physical server which executesonly operating VMs and does not execute idle VMs (hereinafter referredto a physical server A) and a physical server which executes bothoperating VMs and idle VMs (hereinafter referred to as a physical serverB). Both physical servers include a memory whose capacity is 32 GB. Thephysical server A executes 12 operating VMs, and a memory amountallocated to the VMs is 24 GB. On the other hand, the physical server Bexecutes 12 operating VMs and 20 idle VMs, and a memory amount allocatedto the VMs is 64 GB. Here, the memory amount allocated to the VMs islarger than the memory capacity of the physical server B, and memoryovercommit occurs. Then, although there is little difference in CPUutilization between the physical server A and the physical server B, anaverage response time (here, a time required for processings of 6screens) of the physical server B is 1.5 times as much as that of thephysical server A. As described here, performance of processingsdegrades due to memory overcommit.

(2) CPU Utilization in a Data Center.

It is pointed out that there are many idle VMs in a data center andresources of physical servers are not used effectively. This isexplained by using a graph of FIG. 34, which is generated from measureddata in a data center. In FIG. 34, a horizontal axis represents time, avertical axis in the left side represents the number of VMs, and avertical axis in the right side represents CPU utilization. A white barrepresents the number of operating VMs, a black bar represents a sum ofthe number of operating VMs and the number of idle VMs, and a whitetriangle represents CPU utilization. As illustrated in FIG. 34, the CPUutilization is often less than 10%, and the CPU utilization risesslightly more than 10% during a time when the number of operating VMs isgreat. Thus, a CPU of a physical server is not used effectively.Moreover, as illustrated in FIG. 34, the number of VMs in the idle stateis always over 100, and a CPU and a memory in a physical server are usedby those VMs.

In addition, the aforementioned allocation management apparatus 1,application servers 30 to 32, server 5 for idle VMs, and qualitymanagement apparatus 7 are computer devices as illustrated in FIG. 35.That is, a memory 2501 (storage device), a CPU 2503 (processor), a harddisk drive (HDD) 2505, a display controller 2507 connected to a displaydevice 2509, a drive device 2513 for a removable disk 2511, an inputunit 2515, and a communication controller 2517 for connection with anetwork are connected through a bus 2519 as illustrated in FIG. 35. Anoperating system (OS) and an application program for carrying out theforegoing processing in the embodiment, are stored in the HDD 2505, andwhen executed by the CPU 2503, they are read out from the HDD 2505 tothe memory 2501. As the need arises, the CPU 2503 controls the displaycontroller 2507, the communication controller 2517, and the drive device2513, and causes them to perform predetermined operations. Moreover,intermediate processing data is stored in the memory 2501, and ifnecessary, it is stored in the HDD 2505. In this embodiment of thistechnique, the application program to realize the aforementionedfunctions is stored in the computer-readable, non-transitory removabledisk 2511 and distributed, and then it is installed into the HDD 2505from the drive device 2513. It may be installed into the HDD 2505 viathe network such as the Internet and the communication controller 2517.In the computer as stated above, the hardware such as the CPU 2503 andthe memory 2501, the OS and the application programs systematicallycooperate with each other, so that various functions as described abovein details are realized.

The aforementioned embodiment is summarized as follows:

An allocation control method relating to a first aspect of thisembodiment includes: (A) determining, for each of plural virtualmachines executed on a first information processing apparatus or asecond information processing apparatus, whether the virtual machine isexecuting a first processing that is performed in response to a requestfrom an external apparatus; (B) first allocating, to the firstinformation processing apparatus, first virtual machines, which areexecuting the first processing, among the plural virtual machines; and(C) second allocating, to the second information processing apparatus,second virtual machines, which are not executing the first processing,among the plural virtual machines.

Thus, because the first processing is not affected even when memoryovercommit and the like occur in the second information processingapparatus, virtual machines can be gathered in the second informationprocessing apparatus. Therefore, it is possible to reduce the number ofinformation processing apparatuses used for execution of virtualmachines and use resources of information processing apparatuseseffectively. Moreover, it is possible to suppress performancedegradation of the first processing because memory overcommit, whichoccurs due to virtual machines which do not execute the firstprocessing, can be prevented from occurring in the first informationprocessing apparatus.

Moreover, the determining may include: (a1) obtaining information on astate of a third virtual machine that is allocated to the secondinformation processing apparatus in advance, is not included in theplural virtual machines and does not execute the first processing; and(a2) comparing, for each of the plural virtual machines, information ona state of the virtual machine with the obtained information on thestate of the third virtual machine to determine whether the virtualmachine is executing the first processing. As described above, becausethe information on the state of the virtual machine that do not executethe first processing is used, it can be determined, with high accuracy,whether the virtual machine is executing the first processing or not.

Moreover, the second allocating may include: (c1) detecting fourthvirtual machines that have not executed the first processing for a firsttime period or longer in the first information processing apparatus; and(c2) third allocating the fourth virtual machines to the secondinformation processing apparatus. By performing a processing describedabove, it is possible to prevent memory of the first informationprocessing apparatus from being occupied by virtual machines which donot execute the first processing.

Moreover, (b1, c3) the first allocating and the second allocating may beperformed periodically. Thus, it is possible to prevent a processingload from growing large.

Moreover, the allocation control method may further include: (D) firstcalculating a first number of virtual machines that the secondinformation processing apparatus can execute by using information onmemory capacity of the second information processing apparatus andinformation on an amount of memory allocated to one virtual machine; and(E) second calculating, by using an operational history, the first timeperiod under a condition that a second number of virtual machines doesnot exceed the first number of virtual machines, wherein the secondnumber of virtual machines is a number of virtual machines that startsto execute the first processing in the second information processingapparatus during a time period from a last execution of the firstallocating to a next execution of the first allocating. The shorter thefirst time period is, the greater the second number of the virtualmachines is. Then, performance of the first processing executed in thesecond information processing apparatus degrades. Therefore, byperforming a processing described above, it is possible to suppressperformance degradation of the first processing executed in the secondinformation processing apparatus.

Moreover, processing performance of the second information processingapparatus may be lower than processing performance of the firstinformation processing apparatus. It does not matter whether theprocessing performance of the second information apparatus is high ornot, because the first processing is not executed in the secondinformation processing apparatus. Therefore, it is possible toeffectively use an information processing apparatus whose processingperformance is relatively low.

Moreover, a total amount of memory allocated to the second virtualmachines is larger than memory capacity of the second informationprocessing apparatus. Even when memory overcommit occurs, it has noinfluence on the first processing.

Moreover, the second calculating includes: (e1) third calculating, foreach term of plural successive terms, a third number of virtual machinesthat started to execute the first processing in the term and had notexecuted the first processing for the first time period or longer beforethe term; (e2) first identifying a maximum number of virtual machinesfrom among the calculated third numbers of virtual machines; (e3)executing the third calculating and the first identifying plural timeswhile changing the first time period; second identifying, from among theidentified maximum numbers, a first maximum number that is equal to orless than the first number of virtual machines; and (e4) thirdidentifying the first time period that corresponds to the identifiedfirst maximum number. By performing a processing described above, it ispossible to identify the first time period properly.

An allocation control apparatus relating to a second aspect of thisembodiment includes circuitry or a processor programmed to determine,for each of plural virtual machines executed on a first informationprocessing apparatus or a second information processing apparatus,whether the virtual machine is executing a first processing that isperformed in response to a request from an external apparatus, toallocate, to the first information processing apparatus, first virtualmachines, which are executing the first processing, among the pluralvirtual machines, and to allocate, to the second information processingapparatus, second virtual machines, which are not executing the firstprocessing, among the plural virtual machines.

All examples and conditional language recited herein are intended forpedagogical purposes to aid the reader in understanding the inventionand the concepts contributed by the inventor to furthering the art, andare to be construed as being without limitation to such specificallyrecited examples and conditions, nor does the organization of suchexamples in the specification relate to a showing of the superiority andinferiority of the invention. Although the embodiments of the presentinventions have been described in detail, it should be understood thatthe various changes, substitutions, and alterations could be made heretowithout departing from the spirit and scope of the invention.

What is claimed is:
 1. A non-transitory computer-readable storage mediumstoring a program that causes a computer to execute a process, theprocess comprising: obtaining information on a state of a certainvirtual machine that has been deployed on a first information processingapparatus in advance and does not execute a first processing that isperformed in response to a request; first determining whether a firstvirtual machine, from among a first plurality of virtual machinesexecuted on the first information processing apparatus, is executing thefirst processing by comparing information on a state of the firstvirtual machine with the obtained information on the state of thecertain virtual machine; second determining whether a second virtualmachine, from among a second plurality of virtual machines executed on asecond information processing apparatus, is executing the firstprocessing by comparing information on a state of the second virtualmachine with the obtained information on the state of the certainvirtual machine; first migrating, from the second information processingapparatus to the first information processing apparatus, the secondvirtual machine which is determined not to be executing the firstprocessing; and second migrating, from the first information processingapparatus to the second information processing apparatus, the firstvirtual machine which is determined not to be executing the firstprocessing.
 2. The non-transitory computer-readable storage medium asset forth in claim 1, wherein the first migrating comprises: determiningwhether the second virtual machine has not executed the first processingfor a first time period or longer in the second information processingapparatus; and third migrating the second virtual machine to the firstinformation processing apparatus, upon determining that the secondvirtual machine has not executed the first processing for the first timeperiod or longer in the second information processing apparatus.
 3. Thenon-transitory computer-readable storage medium as set forth in claim 1,wherein the first migrating and the second migrating are performedperiodically.
 4. The non-transitory computer-readable storage medium asset forth in claim 3, wherein the process further comprises: firstcalculating a first number of virtual machines that the firstinformation processing apparatus is capable of executing by usinginformation on memory capacity of the first information processingapparatus and information on an amount of memory allocated to onevirtual machine; and second calculating, by using an operationalhistory, a first time period under a condition that a second number ofvirtual machines does not exceed the first number of virtual machines,wherein the second number of virtual machines is a number of virtualmachines that start to execute the first processing in the firstinformation processing apparatus during a time period from a lastexecution of the second migrating to a next execution of the secondmigrating.
 5. The non-transitory computer-readable storage medium as setforth in claim 4, wherein the second calculating comprises: thirdcalculating, for each term of a plurality of successive terms, a thirdnumber of virtual machines that started to execute the first processingin the term and had not executed the first processing for the first timeperiod or longer before the term; first identifying a maximum number ofvirtual machines from among the calculated third numbers of virtualmachines; executing the third calculating and the first identifying aplurality of times while changing the first time period; secondidentifying, from among the identified maximum number of virtualmachines, a first maximum number that is equal to or less than the firstnumber of virtual machines; and third identifying the first time periodthat corresponds to the identified first maximum number.
 6. Thenon-transitory computer-readable storage medium as set forth in claim 1,wherein processing performance of the first information processingapparatus is lower than processing performance of the second informationprocessing apparatus.
 7. The non-transitory computer-readable storagemedium as set forth in claim 1, wherein a total amount of memoryallocated to the first plurality of virtual machines executed on thefirst information processing apparatus is larger than memory capacity ofthe first information processing apparatus.
 8. An allocation controlmethod, comprising: obtaining, by using a computer, information on astate of a certain virtual machine that has been deployed on a firstinformation processing apparatus in advance and does not execute a firstprocessing that is performed in response to a request; firstdetermining, by using the computer, whether a first virtual machine,from among a first plurality of virtual machines executed on a firstinformation processing apparatus, is executing the first processing bycomparing information on a state of the first virtual machine with theobtained information on the state of the certain virtual machine; seconddetermining, by using the computer, whether a second virtual machine,from among a second plurality of virtual machines executed on a secondinformation processing apparatus, is executing the first processing bycomparing information on a state of the second virtual machine with theobtained information on the state of the certain virtual machine; firstmigrating, by using the computer and from the second informationprocessing apparatus to the first information processing apparatus, thesecond virtual machine which is determined to not be executing the firstprocessing; and second migrating, by using the computer and from thefirst information processing apparatus to the second informationprocessing apparatus, the first virtual machine which is determined tobe executing the first processing.
 9. An allocation control apparatus,comprising: a memory; and a processor coupled to the memory, theprocessor being configured to: obtain information on a state of acertain virtual machine that has been deployed on a first informationprocessing apparatus in advance and does not execute a first processingthat is performed in response to a request; first determine whether afirst virtual machine, from among a first plurality of virtual machinesexecuted on the first information processing apparatus, is executing afirst processing by comparing information on a state of the firstvirtual machine with the obtained information on the state of thecertain virtual machine; second determine whether a second virtualmachine, from among a second plurality of virtual machines executed on asecond information processing apparatus, is executing the firstprocessing by comparing information on a state of the second virtualmachine with the obtained information on the state of the certainvirtual machine; first migrate, from the second information processingapparatus to the first information processing apparatus, the secondvirtual machine which is determined not to be executing the firstprocessing; and second migrate, from the first information processingapparatus to the second information processing apparatus, the firstvirtual machine which is determined to be executing the firstprocessing.